package homework7;

public class Code04 {

	public static void main(String[] args) {
		int gewei = 0,shiwei = 0,baiwei = 0;
		int sumgewei = 0,sumshiwei = 0,sumbaiwei = 0;
		for(int i = 100; i < 1000; i++) {
			gewei = i % 10;
			shiwei = i / 10 % 10;
			baiwei = i /100;
			sumgewei = gewei * gewei * gewei;
			sumshiwei = shiwei * shiwei * shiwei;
			sumbaiwei = baiwei * baiwei * baiwei;
			if(i == sumgewei + sumshiwei + sumbaiwei) {
				System.out.println(i + "=" + sumbaiwei + "+" + sumshiwei + "+" + sumgewei);
			}
		}
	}

}
